﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:custom="clr-namespace:DaxStudio.UI.AttachedProperties"
             xmlns:local="clr-namespace:DaxStudio.UI.Views" x:Class="DaxStudio.UI.Views.HelpAboutView"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="400"
             Height="215"
             MaxHeight="450"
    MinWidth="480"
    
             DataContext="{Binding}"
             x:Name="dlgHelpAbout"
             >
    <UserControl.Resources>
        <SolidColorBrush x:Key="DaxStudioBrush" Color="#FF0072C6" />
        <BitmapImage x:Key="DaxStudioLogo"  UriSource="..\images\daxstudio-splash.png"/>
        <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
    </UserControl.Resources>
    <Border Padding="10">
    <Border Background="White" CornerRadius="0" Padding="5" BorderBrush="{StaticResource DaxStudioBrush}" BorderThickness="1">
    
    <Grid>
        <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="6*"/>
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <Image Source="{StaticResource DaxStudioLogo}" Width="150" VerticalAlignment="Top" Margin="20,0,10,0"/>
            <StackPanel Orientation="Vertical">
                <TextBlock Padding="5" FontSize="48"><Run Text="DAX Studio"/></TextBlock>
                <TextBlock Padding="5"><Hyperlink NavigateUri="http://daxstudio.codeplex.com" custom:HyperlinkExtensions.IsExternal="true"><Run Text="http://daxstudio.codeplex.com"/></Hyperlink></TextBlock>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <Label Content="Version: "  HorizontalAlignment="Left"/>
                    <Label x:Name="FullVersionNumber" />
                    <local:ucSpinner x:Name="CheckingUpdateStatus" Visibility="Visible" Width="20"/>
                    <Label x:Name="UpdateStatus" />
                </StackPanel>
                <StackPanel Orientation="Horizontal" >
                    <CheckBox x:Name="showDetails" Width="110" IsChecked="False" Content="Show Details" Margin="5,5,0,0" Padding="5,0,0,0" >
                        <CheckBox.Triggers>
                            <EventTrigger  RoutedEvent="ToggleButton.Checked"  >
                                <BeginStoryboard >
                                    <Storyboard  AutoReverse="False">
                                        <DoubleAnimation  Storyboard.TargetName="dlgHelpAbout"
											Storyboard.TargetProperty = "(FrameworkElement.Height)"
											To="450" Duration="0:0:1"/>
                                        <Storyboard AutoReverse="False">
                                            <DoubleAnimation Storyboard.TargetName="ReferencedAssemblies"
												Storyboard.TargetProperty="(UIElement.Opacity)"
												To="1" Duration="0:0:1" />
                                                    <Storyboard AutoReverse="False">
                                                        <DoubleAnimation Storyboard.TargetName="BuildNumberPanel"
												Storyboard.TargetProperty="(UIElement.Opacity)"
												To="1" Duration="0:0:1" />
                                                    </Storyboard>
                                                </Storyboard>
                                    </Storyboard>
                                </BeginStoryboard>

                            </EventTrigger>

                            <EventTrigger  RoutedEvent="ToggleButton.Unchecked"  >
                                <BeginStoryboard >
                                    <Storyboard  AutoReverse="False">
                                        <DoubleAnimation  Storyboard.TargetName="dlgHelpAbout"
											Storyboard.TargetProperty = "(FrameworkElement.Height)"
											To="215" Duration="0:0:1"/>
                                        <Storyboard AutoReverse="False">
                                            <DoubleAnimation Storyboard.TargetName="ReferencedAssemblies"
												Storyboard.TargetProperty="(UIElement.Opacity)"
												To="0" Duration="0:0:1" />
                                        </Storyboard>
                                    </Storyboard>
                                </BeginStoryboard>

                            </EventTrigger>

                        </CheckBox.Triggers>
                    </CheckBox>

                </StackPanel>
            </StackPanel>
        </StackPanel>
                <StackPanel Orientation="Vertical" Grid.Row="1"  Opacity="0" x:Name="BuildNumberPanel">
                    <StackPanel Orientation="Horizontal" Margin="5,10,0,0">
                        <TextBlock Margin="0,0,5,0">Build: </TextBlock>
                        <TextBlock x:Name="BuildNumber"/>
                    </StackPanel>
                </StackPanel>
                <DataGrid x:Name="ReferencedAssemblies" 
			Grid.Row="2"
			ClipboardCopyMode="IncludeHeader"
			SelectionMode="Single"       
			AlternatingRowBackground="LightGray"  
			VerticalGridLinesBrush="LightGray" 
			HorizontalGridLinesBrush="LightGray"
			VerticalScrollBarVisibility="Visible"
			Opacity="0"       />
                
                <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right" Margin="0,0,5,5">
            <Button x:Name="Ok" Width="75" Height="23" Content="Ok" IsDefault="True" IsCancel="True"/>
        </StackPanel>

    </Grid>
    </Border>
    </Border>
</UserControl>
